﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using DataAccess;

namespace SQT.tracnghiem.Ajax.ASP.Staff
{
    public partial class upload_banner : System.Web.UI.Page
    {
        public const string PATH_UPLOAD = "~/Content/wallpaper/";
        protected void Page_Load(object sender, EventArgs e)
        {
            HttpPostedFile file = Request.Files[0];
            string name = "";
            name += DateTime.Now.Day.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Year.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString();
            name += Session["admin_id"].ToString();
            name += file.FileName;
            file.SaveAs(Server.MapPath(PATH_UPLOAD) + "/" + name);
        }
    }
}